package cn.tedu.three;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class GuanYu {

    private String name="关羽";
    @Autowired
    private DragonBlade dragonBlade;

    public void fight(){
        System.out.println(name+"使用"+dragonBlade.getName()+"战斗");
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public DragonBlade getDragonBlade() {
        return dragonBlade;
    }

    public void setDragonBlade(DragonBlade dragonBlade) {
        this.dragonBlade = dragonBlade;
    }


}
